<?php if (!defined("_ECRIRE_INC_VERSION")) return;

include_spip('functions/pdk_common');
require_once(_DIR_PLUGIN_PDK.'classes/forms/class.PdkListEditor.php');

function formulaires_alohacart_orders_statuts_traiter_dist() {
    $result = array();
        
    $mdl = pdk_load_class('AlohacartOrderStatutModel', 'classes');
    $list_editor = new PdkListEditor($mdl);    
    $flag_result = $list_editor->EditElements(_request('elements_update'), 
                                              _request('elements_insert'), 
                                              _request('elements_delete'));
    
    if ($flag_result) {
        $result['message_ok'] = _T('alohacart:form_saved');
    } else {
        $result['message_erreur'] = _T('alohacart:form_error');
    }
    
    return $result;    
}

?>